package com.liu.domain.controller;

import com.liu.domain.base.BaseController;
import com.liu.domain.vo.DemoVo;
import com.liu.domain.vo.DemoVoresp;
import io.swagger.annotations.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author liuxinghong
 * @Description:
 * @date 2019/3/5/00510:44
 */
@RestController
@RequestMapping("/app_demo")
@Api(tags = "app测试")
public class ModeController extends BaseController {

    @GetMapping(value = "/demo1/{aat}")
    @ApiOperation(value = "测试环境数据")
    public Object demo1(@PathVariable("aat") @ApiParam(value = "查询条件as",name = "as") String as){

        DemoVoresp voresp = new DemoVoresp("0001", "00002");
        return success(voresp);
    }

    @PostMapping(value = "/demo2")
    @ApiOperation(value = "post测试数据")
    public Object postDemo(@Validated  @RequestBody  DemoVo vo){

        return success(new DemoVoresp("0001","00002"));
    }
}
